package com.rututor.server.dao;

import com.googlecode.objectify.ObjectifyService;
import com.googlecode.objectify.util.DAOBase;
import com.rututor.server.entities.TutorApplication;

public class TutorApplicationsDAO extends DAOBase {
	static {
		ObjectifyService.register(TutorApplication.class);
	}

	public long insertApplication(String name, String fileKey) {

		// Simple create
		TutorApplication app = new TutorApplication(name, fileKey);
		ofy().put(app);
		assert app.getId() != null; // id was autogenerated
		return app.getId();
	}
}
